<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>仪表盘</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link href="css/layui.css" rel="stylesheet">
  <style>
    .x-panel{
      padding: 30px 30px;
    }
    .data-title{
      padding: 10px;
      font-size:18px;
      font-weight:bold;
    }
    .data-value{
      padding: 10px;
      font-size:36px;
      font-weight:bold;
    }
  </style>
</head>
<body>
<div class="layui-bg" style="padding: 30px;">
    <div class="layui-row layui-col-space15">
      <div class="layui-col-md5">
        <div class="layui-panel">
          <div class="x-panel">
            <div class="data-title">注册企业总数</div>
            <div id="companyCount" class="data-value" style="color:dodgerblue">0</div>
          </div>
        </div>   
      </div>
      <div class="layui-col-md5">
        <div class="layui-panel">
          <div class="x-panel">
            <div class="data-title">注册用户总数</div>
            <div id="userCount" class="data-value" style="color:darkcyan">0</div>
          </div>
        </div>   
      </div>
      <div class="layui-col-md5">
        <div class="layui-panel">
          <div class="x-panel">
            <div class="data-title">绑定印章总数</div>
            <div id="sealCount" class="data-value" style="color:lightcoral">0</div>
          </div>
        </div>   
      </div>
      <div class="layui-col-md5">
        <div class="layui-panel">
          <div class="x-panel">
            <div class="data-title">用户盖章总数</div>
            <div id="stampCount" class="data-value" style="color:coral;">0</div>
          </div>
        </div>   
      </div>
    </div> 
</div>
<script src="js/layui.js"></script>
<script type="module">
    import dashboard from './js/dashboard.js'
    
    layui.use(['util'], function () {
        var $ = layui.$;
        dashboard.getDashboardData($,function(rspData){
          $('#companyCount').html(rspData.data.companyCount);
          $('#userCount').html(rspData.data.userCount);
          $('#sealCount').html(rspData.data.sealCount);
          $('#stampCount').html(rspData.data.stampCount);
        })
    });
</script>
</body>
</html>